package com.threeti.jiayusms.framework.dao;

import org.hibernate.criterion.DetachedCriteria;

import com.threeti.jiayusms.framework.domain.DomainEntity;
import com.threeti.jiayusms.framework.util.PagedListHandler;

public interface GenericPagedDao<T extends DomainEntity> extends GenericDao<T> {
  PagedListHandler<T> findAllByPage(int currentPageIndex, int startingIndex);
  
  PagedListHandler<T> findByPage(DetachedCriteria criteria, int currentPageIndex, int startingIndex);
  
  PagedListHandler<T> findByPageWithPassedInTotalRowCount(DetachedCriteria criteria, int currentPageIndex, int startingIndex, long totalSize);  
}
